import re
import json
json_str1 = 'fetchJSON_comment98({"jwotestProduct":null,"score":0});'


# 分组
regex = '(fetchJSON_comment98\()(.*)(\);)'
re_grps = re.match(regex, json_str1)
print(re_grps)
print(re_grps.lastindex)
print(re_grps.group(0))
print(re_grps.group(1))
print(re_grps.group(2))
print(re_grps.group(3))

json_obj = json.loads(re_grps.group(2))
print(json_obj,type(json_obj))